<?php

namespace Balance\Model;

use Zend\InputFilter\InputFilter;
use Zend\InputFilter\InputFilterInterface;

class Balance
{
    public $loan_id, $pay_time, $account;
    protected $inputFilter;

    public function exchangeArray($data)
    {
        foreach ($this as $key => $val) {
            $this->$key = empty($data[$key]) ? null : $data[$key];
        }
    }

    public function getArrayCopy()
    {
        return get_object_vars($this);
    }

    public function setInputFilter(InputFilterInterface $inputFilter)
    {
        throw new \Exception('Not used');
    }

    public function getInputFilter()
    {
        if (!$this->inputFilter) {
            $this->inputFilter = new InputFilter();
        }
        return $this->inputFilter;
    }
}